Integrand size = 14, antiderivative size = 137 \[ \int (c+d x)^2 \sec (a+b x) \, dx=-\frac {2 i (c+d x)^2 \arctan \left (e^{i (a+b x)}\right )}{b}+\frac {2 i d (c+d x) \operatorname {PolyLog}\left (2,-i e^{i (a+b x)}\right )}{b^2}-\frac {2 i d (c+d x) \operatorname {PolyLog}\left (2,i e^{i (a+b x)}\right )}{b^2}-\frac {2 d^2 \operatorname {PolyLog}\left (3,-i e^{i (a+b x)}\right )}{b^3}+\frac {2 d^2 \operatorname {PolyLog}\left (3,i e^{i (a+b x)}\right )}{b^3} \]
[Out]
Time = 0.13 (sec) , antiderivative size = 137, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {4266, 2611, 2320, 6724} \[ \int (c+d x)^2 \sec (a+b x) \, dx=-\frac {2 i (c+d x)^2 \arctan \left (e^{i (a+b x)}\right )}{b}-\frac {2 d^2 \operatorname {PolyLog}\left (3,-i e^{i (a+b x)}\right )}{b^3}+\frac {2 d^2 \operatorname {PolyLog}\left (3,i e^{i (a+b x)}\right )}{b^3}+\frac {2 i d (c+d x) \operatorname {PolyLog}\left (2,-i e^{i (a+b x)}\right )}{b^2}-\frac {2 i d (c+d x) \operatorname {PolyLog}\left (2,i e^{i (a+b x)}\right )}{b^2} \]
[In]
[Out]
Rule 2320
Rule 2611
Rule 4266
Rule 6724
Rubi steps \begin{align*} \text {integral}& = -\frac {2 i (c+d x)^2 \arctan \left (e^{i (a+b x)}\right )}{b}-\frac {(2 d) \int (c+d x) \log \left (1-i e^{i (a+b x)}\right ) \, dx}{b}+\frac {(2 d) \int (c+d x) \log \left (1+i e^{i (a+b x)}\right ) \, dx}{b} \\ & = -\frac {2 i (c+d x)^2 \arctan \left (e^{i (a+b x)}\right )}{b}+\frac {2 i d (c+d x) \operatorname {PolyLog}\left (2,-i e^{i (a+b x)}\right )}{b^2}-\frac {2 i d (c+d x) \operatorname {PolyLog}\left (2,i e^{i (a+b x)}\right )}{b^2}-\frac {\left (2 i d^2\right ) \int \operatorname {PolyLog}\left (2,-i e^{i (a+b x)}\right ) \, dx}{b^2}+\frac {\left (2 i d^2\right ) \int \operatorname {PolyLog}\left (2,i e^{i (a+b x)}\right ) \, dx}{b^2} \\ & = -\frac {2 i (c+d x)^2 \arctan \left (e^{i (a+b x)}\right )}{b}+\frac {2 i d (c+d x) \operatorname {PolyLog}\left (2,-i e^{i (a+b x)}\right )}{b^2}-\frac {2 i d (c+d x) \operatorname {PolyLog}\left (2,i e^{i (a+b x)}\right )}{b^2}-\frac {\left (2 d^2\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(2,-i x)}{x} \, dx,x,e^{i (a+b x)}\right )}{b^3}+\frac {\left (2 d^2\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(2,i x)}{x} \, dx,x,e^{i (a+b x)}\right )}{b^3} \\ & = -\frac {2 i (c+d x)^2 \arctan \left (e^{i (a+b x)}\right )}{b}+\frac {2 i d (c+d x) \operatorname {PolyLog}\left (2,-i e^{i (a+b x)}\right )}{b^2}-\frac {2 i d (c+d x) \operatorname {PolyLog}\left (2,i e^{i (a+b x)}\right )}{b^2}-\frac {2 d^2 \operatorname {PolyLog}\left (3,-i e^{i (a+b x)}\right )}{b^3}+\frac {2 d^2 \operatorname {PolyLog}\left (3,i e^{i (a+b x)}\right )}{b^3} \\ \end{align*}
Time = 0.10 (sec) , antiderivative size = 130, normalized size of antiderivative = 0.95 \[ \int (c+d x)^2 \sec (a+b x) \, dx=-\frac {2 i \left (b^2 (c+d x)^2 \arctan \left (e^{i (a+b x)}\right )-d \left (b (c+d x) \operatorname {PolyLog}\left (2,-i e^{i (a+b x)}\right )+i d \operatorname {PolyLog}\left (3,-i e^{i (a+b x)}\right )\right )+d \left (b (c+d x) \operatorname {PolyLog}\left (2,i e^{i (a+b x)}\right )+i d \operatorname {PolyLog}\left (3,i e^{i (a+b x)}\right )\right )\right )}{b^3} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 391 vs. \(2 (120 ) = 240\).
Time = 1.47 (sec) , antiderivative size = 392, normalized size of antiderivative = 2.86
method | result | size |
risch | \(\frac {4 i c d a \arctan \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}-\frac {2 i c^{2} \arctan \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b}+\frac {a^{2} d^{2} \ln \left (1+i {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}-\frac {d^{2} \ln \left (1+i {\mathrm e}^{i \left (b x +a \right )}\right ) x^{2}}{b}+\frac {d^{2} \ln \left (1-i {\mathrm e}^{i \left (b x +a \right )}\right ) x^{2}}{b}-\frac {2 d^{2} \operatorname {Li}_{3}\left (-i {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}+\frac {2 d^{2} \operatorname {Li}_{3}\left (i {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}-\frac {2 c d \ln \left (1+i {\mathrm e}^{i \left (b x +a \right )}\right ) x}{b}+\frac {2 c d \ln \left (1-i {\mathrm e}^{i \left (b x +a \right )}\right ) x}{b}-\frac {2 c d \ln \left (1+i {\mathrm e}^{i \left (b x +a \right )}\right ) a}{b^{2}}-\frac {2 i c d \,\operatorname {Li}_{2}\left (i {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}-\frac {a^{2} d^{2} \ln \left (1-i {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}+\frac {2 c d \ln \left (1-i {\mathrm e}^{i \left (b x +a \right )}\right ) a}{b^{2}}-\frac {2 i d^{2} a^{2} \arctan \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}-\frac {2 i d^{2} \operatorname {Li}_{2}\left (i {\mathrm e}^{i \left (b x +a \right )}\right ) x}{b^{2}}+\frac {2 i d^{2} \operatorname {Li}_{2}\left (-i {\mathrm e}^{i \left (b x +a \right )}\right ) x}{b^{2}}+\frac {2 i c d \,\operatorname {Li}_{2}\left (-i {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}\) | \(392\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 598 vs. \(2 (111) = 222\).
Time = 0.32 (sec) , antiderivative size = 598, normalized size of antiderivative = 4.36 \[ \int (c+d x)^2 \sec (a+b x) \, dx=-\frac {2 \, d^{2} {\rm polylog}\left (3, i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right )\right ) - 2 \, d^{2} {\rm polylog}\left (3, i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right ) + 2 \, d^{2} {\rm polylog}\left (3, -i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right )\right ) - 2 \, d^{2} {\rm polylog}\left (3, -i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right ) + 2 \, {\left (i \, b d^{2} x + i \, b c d\right )} {\rm Li}_2\left (i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right )\right ) + 2 \, {\left (i \, b d^{2} x + i \, b c d\right )} {\rm Li}_2\left (i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right ) + 2 \, {\left (-i \, b d^{2} x - i \, b c d\right )} {\rm Li}_2\left (-i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right )\right ) + 2 \, {\left (-i \, b d^{2} x - i \, b c d\right )} {\rm Li}_2\left (-i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right ) - {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \log \left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + i\right ) + {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \log \left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + i\right ) - {\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x + 2 \, a b c d - a^{2} d^{2}\right )} \log \left (i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right ) + 1\right ) + {\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x + 2 \, a b c d - a^{2} d^{2}\right )} \log \left (i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right ) + 1\right ) - {\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x + 2 \, a b c d - a^{2} d^{2}\right )} \log \left (-i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right ) + 1\right ) + {\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x + 2 \, a b c d - a^{2} d^{2}\right )} \log \left (-i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right ) + 1\right ) - {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \log \left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + i\right ) + {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \log \left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + i\right )}{2 \, b^{3}} \]
[In]
[Out]
\[ \int (c+d x)^2 \sec (a+b x) \, dx=\int \left (c + d x\right )^{2} \sec {\left (a + b x \right )}\, dx \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 402 vs. \(2 (111) = 222\).
Time = 0.42 (sec) , antiderivative size = 402, normalized size of antiderivative = 2.93 \[ \int (c+d x)^2 \sec (a+b x) \, dx=\frac {2 \, c^{2} \log \left (\sec \left (b x + a\right ) + \tan \left (b x + a\right )\right ) - \frac {4 \, a c d \log \left (\sec \left (b x + a\right ) + \tan \left (b x + a\right )\right )}{b} + \frac {2 \, a^{2} d^{2} \log \left (\sec \left (b x + a\right ) + \tan \left (b x + a\right )\right )}{b^{2}} + \frac {4 \, d^{2} {\rm Li}_{3}(i \, e^{\left (i \, b x + i \, a\right )}) - 4 \, d^{2} {\rm Li}_{3}(-i \, e^{\left (i \, b x + i \, a\right )}) - 2 \, {\left (i \, {\left (b x + a\right )}^{2} d^{2} + 2 \, {\left (i \, b c d - i \, a d^{2}\right )} {\left (b x + a\right )}\right )} \arctan \left (\cos \left (b x + a\right ), \sin \left (b x + a\right ) + 1\right ) - 2 \, {\left (i \, {\left (b x + a\right )}^{2} d^{2} + 2 \, {\left (i \, b c d - i \, a d^{2}\right )} {\left (b x + a\right )}\right )} \arctan \left (\cos \left (b x + a\right ), -\sin \left (b x + a\right ) + 1\right ) - 4 \, {\left (i \, b c d + i \, {\left (b x + a\right )} d^{2} - i \, a d^{2}\right )} {\rm Li}_2\left (i \, e^{\left (i \, b x + i \, a\right )}\right ) - 4 \, {\left (-i \, b c d - i \, {\left (b x + a\right )} d^{2} + i \, a d^{2}\right )} {\rm Li}_2\left (-i \, e^{\left (i \, b x + i \, a\right )}\right ) + {\left ({\left (b x + a\right )}^{2} d^{2} + 2 \, {\left (b c d - a d^{2}\right )} {\left (b x + a\right )}\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} + 2 \, \sin \left (b x + a\right ) + 1\right ) - {\left ({\left (b x + a\right )}^{2} d^{2} + 2 \, {\left (b c d - a d^{2}\right )} {\left (b x + a\right )}\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} - 2 \, \sin \left (b x + a\right ) + 1\right )}{b^{2}}}{2 \, b} \]
[In]
[Out]
\[ \int (c+d x)^2 \sec (a+b x) \, dx=\int { {\left (d x + c\right )}^{2} \sec \left (b x + a\right ) \,d x } \]
[In]
[Out]
Timed out. \[ \int (c+d x)^2 \sec (a+b x) \, dx=\int \frac {{\left (c+d\,x\right )}^2}{\cos \left (a+b\,x\right )} \,d x \]
[In]
[Out]